-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(controllers): engine.beginTimer(ms, string)
would evaluate the code immediately instead of after ms
#11953
Conversation
Previosly, the string would be evaluated immediately instead of after the timer. this also caused issues when beginTimer was used recursively.
…ntrollerScriptEngineBase
…ScriptEngineBase::executeFunction is not callable
fyi the pre-commit issue is from eslint because I touched a legacy mapping. Lets just ignore the eslint failure. |
they already did for the actual fix (second commit). the fourth is just to spot issues like this sooner in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, Than it should be safe to merge.
Thank you for the fix.
Thank you. |
form to align with merged PR mixxxdj#11953 "fix(controllers): engine.beginTimer(ms, string) would evaluate the code immediately instead of after ms"
From what I can tell, this must've been broken for years in 2.4 (075664d to be exact)...
The resulting behavior until now was that the string was evaluated immediately instead of after the timeout and when the timer was recurring, it was never evaluated after (since the stored result value was likely not callable).
The first commit fixes the mapping, the second commit fixes the API call, the third commit is some refactoring required for the fourth commit which will cause a
logOrThrowError
when the callback was not callable.